/*
 * @Author: zhengzhuang
 * @Date: 2021-01-23 09:51:44
 * @LastEditors: zhengzhuang
 * @LastEditTime: 2021-01-23 09:52:23
 * @Description: In User Settings Edit
 * @FilePath: /C20Driver/lib/widget/file_image_ex.dart
 */

import 'dart:io';
import 'package:flutter/widgets.dart';

class FileImageEx extends FileImage {
  int fileSize;
  FileImageEx(File file, {double scale = 1.0})
      : assert(file != null),
        assert(scale != null),
        super(file, scale: scale) {
    fileSize = file.lengthSync();
  }

  @override
  bool operator ==(dynamic other) {
    if (other.runtimeType != runtimeType) return false;
    final FileImageEx typedOther = other;
    return file?.path == typedOther.file?.path &&
        scale == typedOther.scale &&
        fileSize == typedOther.fileSize;
  }
}
